//
//  Sku.swift
//  ShopIOS
//
//  Created by Apple on 2019/7/24.
//  Copyright © 2019 Apple. All rights reserved.
//

import Foundation
import SwiftyJSON

struct mSku {
    var Success: String?
    var SkuArray = [mSkuArray]()
    
    init(json: JSON) {
        Success = json["Success"].stringValue
        SkuArray = json["SkuArray"].arrayValue.compactMap({ mSkuArray(json: $0)})
    }
}

struct mSkuArray {
    var Stock: Int = 0
    var Price: Int = 0
    var SkuId: String?
    var count="1" //自定义数量
    
    init(json: JSON) {
        Stock = json["Stock"].intValue
        Price = json["Price"].intValue
        SkuId = json["SkuId"].stringValue
    }
}
struct Sku_Color_Size_Version {
    var SkuId: Int = 0
    var Name: String?
    var EnabledClass: String?
    var Value: String?
    var SelectedClass: String?
    var Img: String?
    
    init(json: JSON) {
        SkuId = json["SkuId"].intValue
        Name = json["Name"].stringValue
        EnabledClass = json["EnabledClass"].stringValue
        Value = json["Value"].stringValue
        SelectedClass = json["SelectedClass"].stringValue
        Img = json["Img"].stringValue
    }
}

